using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using SportTracksPluginFramework;
using ZoneFiveSoftware.Common.Visuals;
using ZoneFiveSoftware.Common.Visuals.Fitness;

namespace FilteredStatistics.View
{
    class ActivityDetailExtension : STFrameworkActivityDetailPagesExtension
    {
        public ActivityDetailExtension()
        {
            Debug.Assert(m_Instance == null);

            m_Instance = this;
        }

#region STFrameworkActivityDetailPagesExtension members

        public override IList<IDetailPage> CreateActivityDetailPageInstances(IDailyActivityView view)
        {
            List<IDetailPage> detailPages = new List<IDetailPage>();

            m_FSActivityDetailPage = new FilteredStatisticsActivityDetailPage(view);

            detailPages.Add(m_FSActivityDetailPage);

            return detailPages;
        }

#endregion

        public static ActivityDetailExtension Instance
        {
            get
            {
                Debug.Assert(m_Instance != null);

                return m_Instance;
            }
        }

        public FilteredStatisticsActivityDetailPage ActivityDetailPage
        {
            get { return m_FSActivityDetailPage; }
        }

        private static ActivityDetailExtension m_Instance = null;

        private FilteredStatisticsActivityDetailPage m_FSActivityDetailPage = null;
    }
}
